package com.itheima.service.impl;

import com.itheima.dao.PermissionDao;
import com.itheima.domain.Permission;
import com.itheima.service.PermissionService;
import com.itheima.util.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class PermissionServiceImpl implements PermissionService {
    @Override
    public List<Permission> findAll() {
     /*   System.out.println("程序员A第二次修改");
        System.out.println("程序员b第二次提交了");*/
        System.out.println("我是分支写入的");
        SqlSession sqlSession = MyBatisUtils.openSession();
        PermissionDao mapper = sqlSession.getMapper(PermissionDao.class);
        List<Permission> all = mapper.findAll();
        return all;
    }
}
